function addComponent(){  
            var tmpFiles = document.getElementById("files");  

            // 添加"选择文件："  
            var newNode2 = document.createElement("span");  
            newNode2.innerHTML = "选择文件：";  
            tmpFiles.appendChild(newNode2);  
              
            // 创建文件域  
            var uploadFile = document.createElement("input");  
            uploadFile.type = "file";   
            uploadFile.name = "uploadFile";  
            tmpFiles.appendChild(uploadFile);  
              
            // 添加删除按钮  
            var button = document.createElement("input");  
            button.type = "button";  
            button.value = "删除";  
            
            //给移除按钮添加点击事件  
            button.onclick = function(){  
                // 切记在删除的时候一定要按顺序来  
                tmpFiles.removeChild(newNode2);  
                tmpFiles.removeChild(uploadFile);  
                tmpFiles.removeChild(button);  
                tmpFiles.removeChild(br2);  
            }  
            tmpFiles.appendChild(button);  
              
            var br2 = document.createElement("br");  
            tmpFiles.appendChild(br2);  
         }  